﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using POCOS;
using DAL;

namespace GUI.Controllers
{
    public class ThemeController : Controller
    {
        private AuteurContext db = new AuteurContext();

        ////
        //// GET: /Theme/

        public ActionResult Index()
        {
           
            return View();
        }


        //public ActionResult Index()
        //{
        //    var subjectsarticle = db.SubjectsArticle.Include(t => t.article);
        //    return View(subjectsarticle.ToList());
        //}

        ////
        //// GET: /Theme/Details/5

        //public ActionResult Details(int id = 0)
        //{
        //    Themes themes = db.SubjectsArticle.Find(id);
        //    if (themes == null)
        //    {
        //        return HttpNotFound();
        //    }
        //    return View(themes);
        //}

        ////
        //// GET: /Theme/Create

        //public ActionResult Create()
        //{
        //    ViewBag.ArticleId = new SelectList(db.Articles, "Id", "Title");
        //    return View();
        //}

        ////
        //// POST: /Theme/Create

        //[HttpPost]
        //public ActionResult Create(Themes themes)
        //{
        //    if (ModelState.IsValid)
        //    {
        //        db.SubjectsArticle.Add(themes);
        //        db.SaveChanges();
        //        return RedirectToAction("Index");
        //    }

        //    ViewBag.ArticleId = new SelectList(db.Articles, "Id", "Title", themes.ArticleId);
        //    return View(themes);
        //}

        ////
        //// GET: /Theme/Edit/5

        //public ActionResult Edit(int id = 0)
        //{
        //    Themes themes = db.SubjectsArticle.Find(id);
        //    if (themes == null)
        //    {
        //        return HttpNotFound();
        //    }
        //    ViewBag.ArticleId = new SelectList(db.Articles, "Id", "Title", themes.ArticleId);
        //    return View(themes);
        //}

        ////
        //// POST: /Theme/Edit/5

        //[HttpPost]
        //public ActionResult Edit(Themes themes)
        //{
        //    if (ModelState.IsValid)
        //    {
        //        db.Entry(themes).State = EntityState.Modified;
        //        db.SaveChanges();
        //        return RedirectToAction("Index");
        //    }
        //    ViewBag.ArticleId = new SelectList(db.Articles, "Id", "Title", themes.ArticleId);
        //    return View(themes);
        //}

        ////
        //// GET: /Theme/Delete/5

        //public ActionResult Delete(int id = 0)
        //{
        //    Themes themes = db.SubjectsArticle.Find(id);
        //    if (themes == null)
        //    {
        //        return HttpNotFound();
        //    }
        //    return View(themes);
        //}

        ////
        //// POST: /Theme/Delete/5

        //[HttpPost, ActionName("Delete")]
        //public ActionResult DeleteConfirmed(int id)
        //{
        //    Themes themes = db.SubjectsArticle.Find(id);
        //    db.SubjectsArticle.Remove(themes);
        //    db.SaveChanges();
        //    return RedirectToAction("Index");
        //}

        //protected override void Dispose(bool disposing)
        //{
        //    db.Dispose();
        //    base.Dispose(disposing);
        //}
    }
}